package com.pms.init.base;

import org.springframework.stereotype.Component;

import com.espirit.eap.manager.ModelBuilderSupport;
import com.espirit.eap.manager.RevisionHistory;
@Component
public class RevisionHistoryBuilder extends ModelBuilderSupport {
	private static final String FIELD_CREATEDBY="createdBy";
	private static final String FIELD_CREATEDON	="createdOn";
	private static final String FIELD_CREATEDON2	="createdOn2";
	private static final String FIELD_MODIFIEDBY	="modifiedBy";
	private static final String FIELD_MODIFYON	="modifyOn";
	private static final String FIELD_MODIFYON2	="modifyOn2";
	
	
	@Override
	public boolean init() {
		return super.setClass(RevisionHistory.class, "Revision", "版本信息");
	}
	
	@Override
	public void buildFields() {
		addModelField(FIELD_CREATEDBY, "Created By", "创建");
		addModelField(FIELD_CREATEDON, "Created On", "创建日期");
		addModelField(FIELD_CREATEDON2, "Created On To", "至");
		addModelField(FIELD_MODIFIEDBY, "Modify By", "修改");
		addModelField(FIELD_MODIFYON, "Modify On", "修改日期");
		addModelField(FIELD_MODIFYON2, "Modify On To", "至");
	}
	
	@Override
	public void prepareLayoutElements() {
		super.prepareLayoutElements();
		
		setWidth(listElements, FIELD_CREATEDBY, 50);
		setWidth(listElements, FIELD_CREATEDON, 60);
		setWidth(listElements, FIELD_MODIFIEDBY, 50);
		setWidth(listElements, FIELD_MODIFYON, 60);
	}
	
	
}
